package com.deelete.springcloud.service.fallback;

import com.deelete.springcloud.pojo.Order;
import com.deelete.springcloud.utils.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

//order类的服务降级
@Slf4j
@Component
public class OrderFallback {

    //下订单方法的服务降级
    public static CommonResult<Order> orderCreateFallback(Order order,Throwable e){
        return new CommonResult<>(CommonResult.STATUS_ERROR,e.toString(),order);
    }
}
